Skip to content

Rewrite Notifications #295

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 4, 2025
Merged

Rewrite Notifications #295

merged 5 commits into from
Apr 4, 2025

Conversation

pinkeshmars
Copy link
Collaborator

Description

Rewrite Notifications

Linear ticket and magic word Fixes DEVR-368

Type of change

  • Typo fix
  • New feature
  • Enhancement to current docs
  • Removed outdated references
  • Update assets

@pinkeshmars pinkeshmars requested a review from PoojaB26 March 10, 2025 07:21
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link
Collaborator

@PoojaB26 PoojaB26 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some suggestions added + an example request that we can do in a separate ticket.
Otherwise LGTM! Apologies for the delay!


# Notifications

**Mobile Notifications** are alerts or messages that appear on a user's device outside the normal UI flow of an app. They can inform the user of time-sensitive or high-priority messages, events, or actions that require attention. Notifications may appear as banners, alerts, pop-ups, or lock-screen notifications, depending on user preferences and platform design guidelines.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we just calling it mobile? There can be web notifications as well right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, removed 'mobile' from multiple places.


Generally, mobile notifications can be divided into two main categories: **Local Notifications** and **Push (remote) Notifications**.

**Local Notifications** are scheduled directly on the device and do not require a server component. They are commonly used for time-based reminders or location-based triggers, such as a daily workout reminder at 7:00 AM. To implement local notifications in FlutterFlow, you can integrate the [flutter_local_notifications](https://pub.dev/packages/flutter_local_notifications) package using custom actions.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a link to custom actions page

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added!

Before you begin, ensure that you have:
- Completed all steps in the
[**Firebase Setup**](../../ff-integrations/firebase/connect-to-firebase-setup.md).
- Upgraded your Firebase project to the [**Blaze plan**](https://firebase.google.com/pricing) to enable cloud functions required for push notifications.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be good to mention that cloud funcs are only required for flutterflow setup for push notifs such as getting fcm token & sending push notifications trigger from flutterflow.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added!

3. Optionally, you can enable **Allow Scheduling** to send push notifications at a later time. Once enabled, you can select **Scheduler Granularity**, which determines how precisely the notifications will be sent. You can choose the granularity based on how time-sensitive your notifications are; For example:
- If you need the notification to be sent at an **exact time** (e.g., 11:37 AM), choose **"1 minute"**.
- If a slight delay is acceptable, you can select **"15 minutes"** or **"1 hour"**, meaning the notification will be sent within that timeframe.
- **Higher precision (e.g., 1-minute intervals) requires more computing resources**, which may **slightly increase costs** (up to $0.50 per month).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job of including the pricing info!




:::tip
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
:::tip
:::warning[Upgrading to Blaze Plan]

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

allow="clipboard-write">
</iframe>
</div>
<p></p>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a note that this key is allowed to download only once.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added! updated directly in Arcade.

Each device is identified by a unique **Device Token/Registration Token** generated by the FCM to target specific devices. The Mobile App on the user's device receives these notifications and handles the payload by displaying messages or navigating the user to specific screens.


## Add Push Notifications
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Add Push Notifications
## Push Notifications Setup

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

</div>
<p></p>

### Send Push Notifications
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Send Push Notifications
## Send Push Notifications

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

- **Deliver With Sound** **(Optional):** Enable this option if you want the notification to play a sound.
- **Batch Notifications** **(Optional):** Toggle this setting if you want to send the notification in batches. Enable this only when you have over 10K users.
- **Scheduled Time (Optional):** Choose the specific date and time for the notification to be sent. This option is available only when the **Allow Scheduling** option is enabled, and the selected date and time follow your timezone.
- **User References (Optional):** Send push notifications to a specific user or a few users. Enter the user document reference (from the 'users' collection in Firestore) into the *User References*.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe a small example because i think the format is users/userId instead of just userId

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the format and image to ensure there’s no room for confusion.


:::tip

On the page that receives the DocumentReference, you can fetch additional details of the item using the [**Backend Query**](#).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# goes nowhere.
Also maybe this is a good example to add? Like what to do when the notification data is received? We can create a separate ticket for this and add the example later maybe?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the '#' and yes we can add that example in a new ticket.

@pinkeshmars
Copy link
Collaborator Author

Some suggestions added + an example request that we can do in a separate ticket. Otherwise LGTM! Apologies for the delay!

No problem :) All review comments are addressed now. Merging it...

@pinkeshmars pinkeshmars merged commit 47ab603 into main Apr 4, 2025
1 check passed
@PoojaB26 PoojaB26 deleted the rewrite/notifications branch April 4, 2025 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants